<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <h1><?php echo $heading_title; ?></h1>
  <div class="content">
    <?php if (isset($reactions)) { ?>
      <?php $labels = array(); $values = array(); ?>
      <h2 style="margin-top: 0px;"><?php echo $poll_data['question']; ?></h2>
        <table width="100%">
        <thead>
          <tr>
            <th width="10%"><?php echo $text_percent; ?></td>
            <th><?php echo $text_answer; ?></td>
          </tr>
        </thead>
        <tbody>
          <?php for($i = 0; $i < 8; $i++) { ?>
            <?php if (!empty($poll_data['answer_' . ($i + 1)])) { ?>
              <?php array_push($labels, $poll_data['answer_' . ($i + 1)]); ?>
              <?php array_push($values, $percent[$i]); ?>
              <tr>
                <td width="10%"><strong><?php echo $percent[$i]; ?>%</strong></td>
                <td><?php echo $poll_data['answer_' . ($i + 1)]; ?></td>
              </tr>
            <?php } ?>
          <?php } ?>
        </tbody>
        <tfoot>
          <tr>
            <td colspan="2"><b><?php echo $text_total_votes; ?></b> <?php echo $total_votes; ?></td>
          </tr>
        </tfoot>
      </table>
      <div style="text-align: center; margin-top: 10px; margin-bottom: 10px;">
        <?php $labels = implode('|', $labels); $values = implode(',', $values); ?>
        <img class="chart" src="http://chart.apis.google.com/chart?cht=p3&chco=303F4A,E4EEF7,849721&chd=t:<?php echo $values; ?>&chs=770x200&chl=<?php echo $labels; ?>" width="500" height="150" alt="chart" />
      </div>
      <div class="enlargement"><a href="<?php echo $enlargement; ?>" class="details"><?php echo $text_enlargement; ?></a></div>
    <?php } else { ?>
      <div style="text-align: center; margin-top: 10px; margin-bottom: 10px;"><?php echo $text_no_votes; ?></div>
    <?php } ?>
    <div class="buttons">
      <div class="right"><a onclick="location='<?php echo $continue; ?>'" class="button"><span><?php echo $button_continue; ?></span></a></div>
    </div>
  </div>
  <?php echo $content_bottom; ?>
</div>
<script type="text/javascript"><!--
$(document).ready(function() {
	$('.details').fancybox({
		'titlePosition' : 'inside',
		'speedIn'       : 600,
		'speedOut'      : 500,
		'transitionIn'  : 'elastic',
		'transitionOut' : 'elastic',
		'easingIn'      : 'easeOutBack',
		'easingOut'     : 'easeInBack'
	});
});
//--></script>
<?php echo $footer; ?>
